<template>
    <div>
    <title-bar :title="titleText"/>
        <textarea @input="onInput" @blur="onblur" @focus="onfocus" @change="onChange" class="textarea"></textarea>
    </div>    
</template>
<script>
import TitleBar from "../components/TitleBar";
import { toast } from "../utils/config";
var test = weex.requireModule("test");
export default {
  components: {
    TitleBar
  },
  data: {
    titleText: "Textarea标签"
  },
  methods: {
    onInput: function(e) {
      // test.showToast(e.value);
      toast(e.value);
    },
    onChange: function(e) {
      toast(e.value);
    },
    onfocus: function(e) {
      test.showToast("focus");
    },
    onblur: function(e) {
      test.showToast("onblur");
    }
  }
};
</script>
<style>
.textarea {
  font-size: 30px;
  width: 650px;
  margin: 50px 0px 0px 50px;
  padding: 30px;
  color: #666666;
  border-width: 2px;
  border-style: solid;
  border-color: #41b883;
}
</style>


